package com.sixth.controller;

import com.sixth.bean.common.BasePageInfo;
import com.sixth.bean.common.BaseRespVo;
import com.sixth.service.AdminFootprintService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName AdminFootprintController
 * @Description TODO
 * @Author XiaoWJ
 * @Date 2022/9/7 19:54
 **/

@RestController
@RequestMapping("admin/footprint")
public class AdminFootprintController {

    @Autowired
    AdminFootprintService adminFootprintService;

    /**
     * 根据条件查询历史足迹
     * @Param  basePageInfo, userId, goodsId
     * @Return BaseRespVo<Object>
     * @author XiaoWJ
     * @date   2022/9/7 20:11
     */

    @RequiresPermissions(value = {"admin:footprint:list"}, logical = Logical.OR)
    @RequestMapping("list")
    public BaseRespVo<Object> list(BasePageInfo basePageInfo, Integer userId, Integer goodsId){
        Object result = adminFootprintService.list(basePageInfo,userId,goodsId);

        return BaseRespVo.ok(result);
    }


}
